Skip to content

fix(replay): Don't mangle private _cssText rrweb property#7033

Merged
Lms24 merged 1 commit into
developfrom
lms-replay-dont-mangle-rrweb-props
Feb 2, 2023
Merged

fix(replay): Don't mangle private _cssText rrweb property#7033
Lms24 merged 1 commit into
developfrom
lms-replay-dont-mangle-rrweb-props

Conversation

@Lms24
Copy link
Copy Markdown
Member

@Lms24 Lms24 commented Feb 2, 2023

Our mangler strikes again! This time in rrweb where attributes._cssText is accessed (example). This PR adds this property to the list of reserved properties excluded from mangling.

Note: I went through the rrweb source code and didn't find other private properties, leading me to believe that for now we should be good in terms of bundling. rrweb accesses a bunch of double __ variables (e.g. __sn here) but these are not touched by terser and hence fine (+ I double checked that they actually end up in our bundles).

h/t @billyvg for raising this issue

@Lms24 Lms24 requested a review from mydea February 2, 2023 08:08
@Lms24 Lms24 self-assigned this Feb 2, 2023
@Lms24 Lms24 requested a review from billyvg February 2, 2023 08:08
Copy link
Copy Markdown
Member

@mydea mydea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch!!

@Lms24 Lms24 force-pushed the lms-replay-dont-mangle-rrweb-props branch from 2efca38 to d3efaff Compare February 2, 2023 09:07
@Lms24 Lms24 merged commit 46de4e2 into develop Feb 2, 2023
@Lms24 Lms24 deleted the lms-replay-dont-mangle-rrweb-props branch February 2, 2023 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants